#include <iostream>
#include<iomanip>
#include <string>
#include <cmath>
#include <time.h>

using namespace std;




 double LA;
 double IR;
 int LP;
 double MP;


double calcuateMonthlyPayments(double LA, double IR, int LP)
{
   
    double monthlyPayment = 0.0;

        monthlyPayment = (LA / (( 1 - 1/ pow(1 + IR, LP) ) / IR));

        monthlyPayment = (monthlyPayment + LA) / (LP*12);

    return monthlyPayment;
}




void AutoMonthlyPayment()
{

	double L;
	cout << "Enter Loan Amount: ";
	cin >> L;
	
	double r;
	cout << "Enter Interest Rate: ";
	cin >> r;
	
	int months;
	cout << "Enter Loan Period in Months: ";
	cin >> months;

    cout << "Test Calculate: " << calcuateMonthlyPayments(L, r, months) << "\n";


}
